Skip to content

fix(model_names, X): updates to ApiSimulation and ApiModel#79

Merged
jlarsen-usgs merged 3 commits into
MODFLOW-ORG:developfrom
jlarsen-usgs:conflict_resolve
Apr 30, 2025
Merged

fix(model_names, X): updates to ApiSimulation and ApiModel#79
jlarsen-usgs merged 3 commits into
MODFLOW-ORG:developfrom
jlarsen-usgs:conflict_resolve

Conversation

@jlarsen-usgs
Copy link
Copy Markdown
Contributor

  • filter interface models from model_names
  • slice x array by nodetouser.size to avoid IndexErrors from MAW heads

Closes #70
Closes #71

* filter interface models from model_names
* slice x array by nodetouser.size to avoid IndexErrors from MAW heads
@jlarsen-usgs jlarsen-usgs merged commit 7aa43ca into MODFLOW-ORG:develop Apr 30, 2025
38 checks passed
Copy link
Copy Markdown
Contributor

@pya pya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Channing:

if name.startswith("GWTIM") or name.startswith("GWFIM") or name.startswith("GWEIM"):

to

if any(name.startswith(prefix) for prefix in ["GWTIM", "GWFIM", "GWEIM"]):

makes the line shorter. I also allows to move the list of unwanted names to a variable , i.e. interface_model_names = ["GWTIM", "GWFIM", "GWEIM"] :

if any(name.startswith(prefix) for prefix in interface_model_names):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

One-off error for property X model_names contains names of non-existing models

2 participants